package com.rockcent.mall.lib.repository.api;

import com.rockcent.common.common.JsonResult;
import org.springframework.stereotype.Repository;
import retrofit2.Call;
import retrofit2.http.*;

/**
 * Created by DK on 16/9/12.
 * 分销市场
 */
@Repository
public interface MerchantMarketApi<T> {

    @GET(value = "v1/products")
    Call<JsonResult> findSaleMarketListPage(@Header("accessToken")String accessToken, @Query("pageNo")Integer pageNo, @Query("pageSize")Integer pageSize);

    @GET(value = "v1/product/sales_count")
    Call<JsonResult<Long>> productSalesCount(@Header("accessToken")String accessToken);

    @FormUrlEncoded
    @POST("v1/app/auth")
    Call<JsonResult<MartketAccessToken>> getAccessToken(@Field("appKey") String appKey , @Field("secret") String secret);
}
